package com.ruoyi.jypc.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.jypc.mapper.CanteentypeMapper;
import com.ruoyi.jypc.domain.Canteentype;
import com.ruoyi.jypc.service.ICanteentypeService;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author qjh
 * @date 2022-10-20
 */
@Service
public class CanteentypeServiceImpl implements ICanteentypeService 
{
    @Autowired
    private CanteentypeMapper canteentypeMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param typeid 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public Canteentype selectCanteentypeByTypeid(Long typeid)
    {
        return canteentypeMapper.selectCanteentypeByTypeid(typeid);
    }
    
    /**
     * 查询餐厅类别信息列表
     * @return 【请填写功能名称】集合
     */
    @Override
    public List<Canteentype> selectCanteentypeListAll(){
    	return canteentypeMapper.selectCanteentypeListAll();
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param canteentype 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<Canteentype> selectCanteentypeList(Canteentype canteentype)
    {
        return canteentypeMapper.selectCanteentypeList(canteentype);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param canteentype 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertCanteentype(Canteentype canteentype)
    {
        canteentype.setCreateTime(DateUtils.getNowDate());
        return canteentypeMapper.insertCanteentype(canteentype);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param canteentype 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateCanteentype(Canteentype canteentype)
    {
        canteentype.setUpdateTime(DateUtils.getNowDate());
        return canteentypeMapper.updateCanteentype(canteentype);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param typeids 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteCanteentypeByTypeids(Long[] typeids)
    {
        return canteentypeMapper.deleteCanteentypeByTypeids(typeids);
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param typeid 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteCanteentypeByTypeid(Long typeid)
    {
        return canteentypeMapper.deleteCanteentypeByTypeid(typeid);
    }
}
